﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Anagramme.Contracts.Tests
{
    [TestClass]
    public class GameInfoTests
    {
        [TestMethod]
        public void SetCurrentRoundRaisePropertyChanged()
        {
            string actual = string.Empty;
            string expected = "CurrentRound";

            GameInfo game = new GameInfo();
            game.PropertyChanged += (s, e) => actual = e.PropertyName;
            game.CurrentRound = 3;

            Assert.AreEqual(expected, actual);
        }

        [TestMethod]
        public void SetGameModeRaisePropertyChanged()
        {
            string actual = string.Empty;
            string expected = "GameMode";

            GameInfo game = new GameInfo();
            game.PropertyChanged += (s, e) => actual = e.PropertyName;
            game.GameMode = GameModes.ScoreMode;

            Assert.AreEqual(expected, actual);
        }

        [TestMethod]
        public void SetIsPlayingRaisePropertyChanged()
        {
            string actual = string.Empty;
            string expected = "IsPlaying";

            GameInfo game = new GameInfo();
            game.PropertyChanged += (s, e) => actual = e.PropertyName;
            game.IsPlaying = true;

            Assert.AreEqual(expected, actual);
        }

        [TestMethod]
        public void SetTargetRaisePropertyChanged()
        {
            string actual = string.Empty;
            string expected = "Target";

            GameInfo game = new GameInfo();
            game.PropertyChanged += (s, e) => actual = e.PropertyName;
            game.Target = 3;

            Assert.AreEqual(expected, actual);
        }
    }
}
